package com.ufo.store.management.widget.dialog;

import android.app.Activity;
import android.app.Dialog;
import android.content.Context;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.Window;
import android.widget.TextView;

import com.ufo.store.management.R;


public class WaitDialog extends Dialog {

    private Context mContext = null;
    private String message = null;
    private TextView msgTv = null;

    public WaitDialog(Context context) {
        super(context, R.style.select_dialog);
        this.mContext = context;
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.dialog_wait);
        msgTv = findViewById(R.id.msg);
        if (!TextUtils.isEmpty(message)) {
            msgTv.setText(message);
        }
    }

    public void setMessage(String txt) {
        message = txt;
        if (msgTv != null && !TextUtils.isEmpty(message)) {
            msgTv.setText(message);
        }
    }
}
